package com.example.app16_event.component;

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.ImageView;

import androidx.annotation.Nullable;

@SuppressLint("AppCompatCustomView")
public class MyImageView extends ImageView {

    private static final String TAG = "MyImageView";

    public MyImageView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        Log.i(TAG, TAG + " MyImageView()");
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent event) {
        Log.i(TAG, TAG + " dispatchTouchEvent() --> " + event.getAction());
        return super.dispatchTouchEvent(event);
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        Log.i(TAG, TAG + " onTouchEvent() --> " + event.getAction());
        return super.onTouchEvent(event);
    }
}
